<?php $count = count($this->data);
      $ceilResult = ceil($count/4);
      $SS = new Zend_Session_Namespace ('Language');

$lang = $SS->language;
$langBestProduct = "Sản phẩm bán chạy";  
if($lang == "en"){
$langBestProduct = "Best products";  
}elseif($lang == "chi"){
$langBestProduct = "最好的產品";  
}   
?>
<div class="row text-center cate-products">
                    <h2 class="selling-products"><span><?php echo $langBestProduct;?></span></h2>
                    <div class="carousel slide span12"  id="myCarousel2">
                        <div class="carousel-inner">
                            <div class="item active">
                                <ul class="thumbnails">
                            <?php foreach($this->data as $key=>$value):
                                  $check = $key%4;  
                                  if($key > 0) {
                                  if($check == 0){
                             ?>
                                </ul>
                            </div> 
                            <div class="item">
                                <ul class="thumbnails">
                                 <?php } }?>  
                                    <?php $namePro = $value['name'];
                                          if($lang == "en"){
                                          $namePro = $value['name_en'];  
                                          }elseif($lang == "chi"){
                                          $namePro = $value['name_china'];
                                          } 
                                    ?>
                                    <li class="span3">
                                        <div class="row-fluid thumbnail">
                                            <a href="<?php echo "/san-pham/".$value['id']."-".$this->cleanstring($value['name']).".html";?>" title="<?php echo $value['name'];?>"><img src="<?php echo $this->baseUrl()."/upload/".$value['image'];?>" alt="" class="span12 img-polaroid" height="130" width="220"/></a>
                                            <h4><?php echo $namePro;?></h4>
                                            <span><?php echo number_format($value['price']);?> VND/kg</span>
                                        </div>
                                    </li>
                              
                             <?php endforeach;?>
                             </ul>
                            </div> 
                        </div>
                    </div><!--End .carousel-->
                </div><!--End .selling-products-->